<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 3.外联式 -->
    <script src="./demo.js">

    </script>
</head>
<body>
    <h3>js是负责逻辑处理的，比如请求数据</h3>
    <!-- 1.内嵌式 -->
    <script>
        alert('冬天为了你挡过寒风受过冷');
    </script>
    <!-- 2.行内式 -->
    <input type="text" onclick="alert('春雨后太阳缓缓露出笑容');">
</body>
</html>